package designpattern.singleton.type2;

/*
    单例模式（静态代码块）
 */
public class Singleton {
    private static final Singleton singleton;

    static {
        singleton = new Singleton();
    }

    private Singleton(){
    }

    public static Singleton getInstance(){
        return singleton;
    }
}
